<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateTestTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('test', function (Blueprint $table) {
            $table->id();
            $table->string('name')->comment("名称");
            $table->integer('tid')->comment("关联id");
            $table->string('tids')->comment("关联id组");
            $table->text('description')->comment("描述");
            $table->text('content')->comment("富文本");
            $table->string('phone',20)->comment("电话");
            $table->string('password',100)->comment("密码");
            $table->string('url')->comment("url地址");
            $table->string('email')->comment("邮箱号");
            $table->string('ip')->comment("IP地址");
            $table->string('color')->comment("颜色");
            $table->string('tags')->comment("标签");
            $table->tinyInteger('type')->comment("类型");
            $table->string('types')->comment("多种类型");
            $table->tinyInteger('select')->comment("选项类型");
            $table->string('selects')->comment("多选类型");
            $table->tinyInteger('switch')->comment("开关");

            $table->date('date')->comment("日期");
            $table->dateTime('datetime')->comment("日期时间");
            $table->time('time')->comment("时间");
            $table->timestamp('timestamp')->comment("日期时间");

            $table->string('avatar')->comment("头像");
            $table->json('images')->comment("多图");
            $table->string('file')->comment("文件");
            $table->json('files')->comment("多文件");

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('test');
    }
}
